Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Add support for vesting contract #4786

Merged
merged 1 commit into from
Oct 5, 2022
Merged

[CLI] Add support for vesting contract #4786

merged 1 commit into from
Oct 5, 2022

Conversation

movekevin
Copy link
Contributor

@movekevin movekevin commented Oct 5, 2022

This change is Reviewable

Comment on lines 25 to 27
UnlockVestingRewards(UnlockVestingRewards),
UnlockVestedCoins(UnlockVestedCoins),
VestingDistribute(VestingDistribute),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three things don't mean much to me, and as a user I wouldn't be able to tell between the three.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any better suggestions for naming then?

Comment on lines 306 to 315

#[derive(Parser)]
pub struct UnlockVestingRewards {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these commands should have a doc comment explaining what it does

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 413 to 420
prompt_yes_with_override(
&format!(
"Unlock vested coins for vesting contract {}. Confirm?",
vesting_contract_address
),
self.txn_options.prompt_options,
)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might get rid of these, because it asks you again when you simulate the transaction for confirmation. But, it's fine for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted them

Comment on lines 348 to 325
#[derive(Parser)]
pub struct VestingDistribute {
/// Address of the vesting contract's admin.
///
/// Defaults to the profile's address if not set.
#[clap(long, parse(try_from_str=crate::common::types::load_account_arg))]
pub admin_address: AccountAddress,

#[clap(flatten)]
pub(crate) txn_options: TransactionOptions,
}

#[async_trait]
impl CliCommand<TransactionSummary> for VestingDistribute {
fn command_name(&self) -> &'static str {
"VestingDistribute"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep all the commands as verb-item

DistributeVestingRewards

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

✅ Forge suite land_blocking success on 21103b525b512ed3720ec18af77fb31a1d3d70e3

performance benchmark with full nodes : 6916 TPS, 5758 ms latency, 7900 ms p99 latency,(!) expired 380 out of 2953840 txns
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

✅ Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> 21103b525b512ed3720ec18af77fb31a1d3d70e3

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> 21103b525b512ed3720ec18af77fb31a1d3d70e3 (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 7307 TPS, 5186 ms latency, 9000 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 21103b525b512ed3720ec18af77fb31a1d3d70e3
compatibility::simple-validator-upgrade::single-validator-upgrade : 5682 TPS, 7054 ms latency, 8500 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 21103b525b512ed3720ec18af77fb31a1d3d70e3
compatibility::simple-validator-upgrade::half-validator-upgrade : 4860 TPS, 9012 ms latency, 13300 ms p99 latency,no expired txns
4. upgrading second batch to new version: 21103b525b512ed3720ec18af77fb31a1d3d70e3
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7297 TPS, 5290 ms latency, 8000 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> 21103b525b512ed3720ec18af77fb31a1d3d70e3 passed
Test Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants